<template>
	<view class="wrapper">
		<view class="myContent" v-for="(item, index) in listData" :key="index" @click="toDetail(item)">
			<view class="myL">
				<view class="myLbox">
					<view class="myL_title">
						<div>{{ item.buildingName + '-' + item.elevatorAddress }}
							<text class="status tit_rep tag">保养</text>
						</div>
					</view>
					<view class="myR_state">
						<text :style="{ color: statusColor[item.appealResult - 1] }">{{ statusList[item.appealResult -
							1]
						}}</text>
						<text :style="{
							'border-right': '2rpx solid ' + statusColor[item.appealResult - 1],
							'border-top': '2rpx solid ' + statusColor[item.appealResult - 1],
						}"></text>
					</view>
				</view>
				<view class="myL_Time">
					{{ item.appealTime || '--' }}
				</view>
				<view class="myL_tit">
					<view>问题总数:</view>
					<view>{{ item.questionCount }}</view>
				</view>
				<view class="myL_tit">
					<view>保养人员:</view>
					<view>{{ item.planUserNames || '--' }}</view>
				</view>
			</view>
		</view>

	</view>
</template>

<script>
export default {
	props: {
		listData: {
			type: Array,
			default: () => {
				return [];
			}

		},
		msg: {
			type: Object,
			default: () => {
				return {};
			}
		}
	},
	created() {
	},
	data() {
		return {
			statusList: ['待审核', '审核通过', '审核不通过'],
			statusColor: ['#FA6400', '#16BF99', '#E02020',],
		};
	},
	methods: {
		toDetail(item) {
			uni.navigateTo({
				url: '/subpages/correction/appealDetail?planId=' + item.planId + '&elevatorId=' + item.elevatorId + '&id=' + item.id + '&isApproval=true',
			});

		}
	},
};
</script>

<style lang="scss">
.wrapper {
	// padding: 0 20rpx;

	.myContent {
		background: #ffffff;
		border-radius: 8rpx;
		display: flex;
		flex-direction: row;
		padding: 20rpx;
		margin-bottom: 20rpx;

		.myL {
			width: 100%;

			.myLbox {
				display: flex;
				justify-content: space-between;
				margin-bottom: 18rpx;
			}

			.myL_title {

				text {
					display: inline-block;
				}

				.status {
					padding: 0rpx 8rpx;
					border-radius: 8rpx;
					font-size: 26rpx !important;
					font-weight: normal !important;
					margin-left: 10rpx;
				}

				.tag {
					border: 2rpx solid transparent;
				}

				.stop {
					border: 2rpx solid #e02020;
					color: #e02020;
					margin-right: 12rpx;
				}

				.normal {
					border: 2rpx solid #0091ff;
					color: #0091ff;
					margin-right: 12rpx;
				}

				.tit_rep {
					color: #0091FF;
					background: #DCF0FF;
				}
			}

			.myL_Time {
				font-size: 24rpx;
				font-weight: 400;
				color: #999999;
				margin-bottom: 15rpx;
			}

			.myL_reptit {
				min-height: 40rpx;
				display: flex;
				flex-direction: row;
				margin-bottom: 8rpx;
				align-items: center;

				view:nth-of-type(1) {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					width: 115rpx;
				}

				.myL_state {
					border: 2rpx solid #0091ff;
					border-radius: 8rpx;
					font-size: 24rpx;
					font-weight: 400;
					color: #0091ff;
					padding: 0 15rpx;
				}
			}

			.myL_tit {
				min-height: 40rpx;
				display: flex;
				flex-direction: row;

				view:nth-of-type(1) {
					font-size: 24rpx;
					font-weight: 400;
					color: #999999;
					width: 115rpx;
				}

				view:nth-of-type(2) {
					width: calc(100% - 115rpx);
					font-size: 24rpx;
					font-weight: 400;
					color: #333333;
					// width: 320rpx;
					// overflow: hidden;
					// text-overflow: ellipsis;
					// white-space: nowrap;
				}
			}
		}

		.myR_state {
			width: 180rpx;
			text-align: right;

			text:nth-of-type(1) {
				font-size: 24rpx;
				font-weight: 400;
				color: #fa6400;
				display: inline-block;
				margin-right: 5rpx;
			}

			text:nth-of-type(2) {
				display: inline-block;
				width: 12rpx;
				height: 12rpx;
				border-right: 2rpx #fa6400 solid;
				border-top: 2rpx #fa6400 solid;
				transform: rotate(45deg);
			}
		}
	}
}
</style>
